/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.luxoft.corporate.blog.db.entities;

import java.util.Objects;

/**
 *
 * @author Egor
 */
public class Topic {
    private final int id;
    private String topicName;
    private String topicDesctription;

    public Topic() {
        id = 0;
    }

    public Topic(int id, String topicName, String topicDesctription) {
        this.id = id;
        this.topicName = topicName;
        this.topicDesctription = topicDesctription;
    }

    public int getId() {
        return id;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public String getTopicDesctription() {
        return topicDesctription;
    }

    public void setTopicDesctription(String topicDesctription) {
        this.topicDesctription = topicDesctription;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 53 * hash + this.id;
        hash = 53 * hash + Objects.hashCode(this.topicName);
        hash = 53 * hash + Objects.hashCode(this.topicDesctription);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Topic other = (Topic) obj;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    
    
}
